import Cookies from 'js-cookie'

const TokenKey = 'USER-TOEKN'

export function getToken () {
  return Cookies.get(TokenKey)
}

export function setToken (data) {
  Cookies.set(TokenKey, data.token, { expires: new Date(data.expire) })
}

export function removeToken () {
  return Cookies.remove(TokenKey)
}
